package main

import "fmt"
import "strings"

func main() {
	//Contains
	fmt.Println(strings.Contains("tommas", "mas"))
	fmt.Println(strings.Contains("tommas", "alice"))
	//Join
	a := []string{"hellen", "changsha", "jindaolu110"}
	s := strings.Join(a, "-")
	fmt.Println("s=", s)
	//Index
	fmt.Println(strings.Index("rainydays", "rain"))
	fmt.Println(strings.Index("returningback", "is"))
	//Repeat
	s = strings.Repeat("beijing", 5)
	fmt.Println("s=", s)
	//Split
	demo := "I love java@java is a good time@time is a good hobby@hobby is a good city@city is a good reason"
	fmt.Println("demo=", demo)
	string_slice := strings.Split("demo", "@")
	fmt.Println("string_slice=", string_slice)
	//Trim
	s = strings.Trim("        ioss    llddo   ksks ", "ios")
	fmt.Println("s=", s)
}
